﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SQLServerHealthCheck.SQLServer.IssueTypes
{
    public static class IssueTypesFactory
    {
        public static List<IssueTypeCheckBase> GetAllChecks()
        {
            List<IssueTypeCheckBase> checks = new List<IssueTypeCheckBase>();

            //Add if constructions to dynamically add or remove checks for example with checkboxes in the GUI

            checks.Add(new DatabaseCheckFullRecoveryModelWithNoLogBackup());
            checks.Add(new DatabaseCheckNoRecentBackup());
            checks.Add(new DatabaseCheckMdfFileonCdrive());
            checks.Add(new DatabaseCheckStateOffline());
            checks.Add(new DatabaseCheckLogFileSizetoData());
            checks.Add(new DatabaseCheckCompatibilityLevel());
            checks.Add(new DatabaseCheckDataAndLogonSameDrive());
            checks.Add(new ServerCheckFreeSpaceLess10percent());
            checks.Add(new ServiceCheckNotLatestServicePack());
            checks.Add(new DatabaseCheckTempdbAndDataSameDrive());
            checks.Add(new ServiceCheckTooManyDatabaseOwners());
            checks.Add(new SecurityCheckUserOrphanedDatabaseUsers());
            checks.Add(new SecurityCheckTooManySysAdminLogins());
            checks.Add(new PerformanceCheckFragmentedClusteredIndexes());
            checks.Add(new PerformanceCheckHasNoClustered());// Issue Type 5002
            checks.Add(new DatabaseCheckAutoShrinkStateOn()); // Issue Type 3011
            checks.Add(new DatabaseCheckMaxFileGrowthStateOn()); //IssueTypeCheckBase Type 3009
            checks.Add(new ServiceCheckTempDBdatafilesLessProcessorsCount()); //IssueType 2004           
            checks.Add(new ServiceCheckOleAutomationEnabled()); //IssueType 2005
            checks.Add(new ServiceCheckXPcmdshellEnabled()); //IssueType 2006
            checks.Add(new ServiceCheckMixedAuthenticationMode()); // IssueType 2007

            return checks;
        }
    }

}
